package com.example.mapper;

import com.example.entity.Delivery;
import com.example.entity.User;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DeliveryMapper {


    void insert(Delivery delivery);

    void deleteById(Integer id);

    Delivery selectById(Integer id);

    List<Delivery> selectAll(Delivery delivery);

    void updateById(Delivery dbDelivery);

    @Select("select * from delivery where username = #{username}")
    Delivery selectByUsername(String username);

    @Select("select count(*) from delivery where status = #{status} ")
    Integer countOnlineDelivery(Delivery delivery);
}
